<!DOCTYPE html>
<html lang="en">

<!--
  Author：蓝田_Loto
  Date：2018-09-04 18:02
  PageName：b_E.html
  Function：属性选择器 - 图片灯箱导航实例 E[attr]
  URL：http://localhost:8080/d3_selector_attribute/b_E.html
-->

<head>
    <meta charset="UTF-8">
    <title>属性选择器 - 图片灯箱导航实例</title>

    <style type="text/css">
        /* 灯箱外框样式 */
        .pic_box {
            border: solid 6px #bbb;
            position: relative;
            float: left;
        }

        .pic_box img {
            width: 500px;
            border: solid 1px #fff;
        }

        /* 导航框样式 */
        .nav {
            background: #999;
            border: 1px solid #ccc;
            padding: 4px 12px;
            float: left;
            opacity: 0.6;
            position: absolute;
            bottom: 6px;
            right: 12px;
        }

        /* 导航按钮样式*/
        .nav a {
            float: left;
            display: block;
            height: 20px;
            line-height: 20px;
            width: 20px;
            -moz-border-radius: 10px;
            -webkit-border-radius: 10px;
            border-radius: 10px;
            text-align: center;
            background: #f36;
            color: green;
            margin-left: 5px;
            text-decoration: none;
        }

        .nav a:hover {
            background: green;
            color: #fff;
        }

        /* E[attr]属性选择器 */
        /* 属性快速匹配 */
/*        .nav a[id] {
            background: blue;
            color: yellow;
            font-weight: bold;
        }*/

        /* 多属性快速匹配 */
        .nav a[href][title] {
            background: yellow;
            color: green;
        }
    </style>
</head>

<body>
<div class="pic_box">
    <img src="images/bg1.jpg">

    <div class="nav">
        <a href="#1" class="links item first" title="w3cplus" target="_blank" id="first">1</a>
        <a href="#2" class="links active item" title="test website" target="_blank" lang="zh">2</a>
        <a href="#3" class="links item" title="this is a link" lang="zh-cn">3</a>
        <a href="#4" class="links item" target="_balnk" lang="zh-tw">4</a>
        <a href="#5" class="links item" title="zh-cn">5</a>
        <a href="#6" class="links item" title="website link" lang="zh">6</a>
        <a href="#7" class="links item" title="open the website" lang="cn">7</a>
        <a href="#8" class="links item" title="close the website" lang="en-zh">8</a>
        <a href="#9" class="links item" title="http://www.baidu.com">9</a>
        <a href="#10" class="links item last" id="last">10</a>
    </div>
</div>
</body>
</html>